package com.javaee.ioc.javaconfig;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class BeanTest {
    public static void main(String[] args){
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);
        MyBean myBean = (MyBean) context.getBean("myBean");
        myBean.say();
    }
}
